/**
 * This file is part of the dspace-poltman project http://www.poltman.com.
 *
 * This is free software; you can redistribute it and/or modify it under
 * the terms of DuraSpace DSpace license detailed in the LICENSE and NOTICE 
 * files at the root of the source tree and available online at
 * http://www.dspace.org/license/
 * 
 */

package com.poltman.dscentral.db.service.pm.impl;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.poltman.dscentral.db.entity.dspace.EPersonEntity;
import com.poltman.dscentral.db.entity.pm.BaseUserEntity;
import com.poltman.dscentral.db.exceptions.RepositoryAccessException;
import com.poltman.dscentral.db.exceptions.RepositoryException;
import com.poltman.dscentral.db.repository.pm.BaseUserRepository;
import com.poltman.dscentral.db.service.pm.BaseUserService;


/**
 * 
 * @author z.ciok@poltman.com
 * @version $Revision: 1542 $
 *
 */
@Repository
@Service("baseUserService")
public class BaseUserServiceImpl implements BaseUserService {
	
	private static Logger log = Logger.getLogger(BaseUserServiceImpl.class);
	
	@Autowired
	private BaseUserRepository baseUserRepository;
	
	@Override
	public BaseUserEntity findByEpersonId(Integer epersonId) throws RepositoryAccessException, RepositoryException {
		return baseUserRepository.findByEpersonId(epersonId);
	}
	
	@Override
	public BaseUserEntity save(BaseUserEntity baseUserEntity) throws Exception {
		return baseUserRepository.save(baseUserEntity);
	}		
}
